package com.lnking.lnkingplace.mapper;


import com.lnking.lnkingplace.model.dto.exhibition.ExhibitionStatisticDto;
import com.lnking.lnkingplace.model.dto.meeting.MeetingStatisticDto;
import com.lnking.lnkingplace.model.dto.place.PlacePositionDto;
import com.lnking.lnkingplace.model.dto.statistic.*;
import com.lnking.lnkingplace.model.entity.Inspect;
import com.lnking.lnkingplace.model.request.statistic.*;
import com.lnking.starter.mybatis.entity.Page;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 合同附件表 Mapper 接口
 * </p>
 *
 * @author sn
 * @since 2022-08-19
 */
public interface StatisticMapper {

    List<PersonCheckStatusDto> statisticPersonCheckStatus(PersonCheckStatusSearchParams params);

    Integer getTodayCheckPersonNumber(PersonCheckStatusSearchParams params);

    Integer getAllPersonNum(PersonCheckStatusSearchParams params);

    Integer placeNum(UserPlaceRequest params);

    Integer userNum(UserPlaceRequest params);

    InspectDto inspectNum();

    String rectificationNum();

    List<String> placeAll();

    List<String> userAll();


    String leaderShipNum();

    String assistanceNum();

    String suggestNum();

    String noticeNum();

    IsolationDto isolation();

    String isolationRoom();

    List<CommonTypeNumDto> getRoomByType();

    String isolationUser();

    List<CommonTypeNumDto> getUserByType();

    String isolationWorker();

    List<CommonTypeNumDto> getWorkerByType();

    Integer OnDutyNum(UserPlaceRequest userPlaceRequest);


    /**
     * 外来人员历史总人数
     * @return
     */
    Integer historyOutsidersNum(BaseStatisticParams  params);

    /**
     * 外来人员今天新增人数
     * @return
     */
    Integer nowOutsidersNum(BaseStatisticParams  params);
    /**
     * 外来人员管控人数
     * @return
     */
    Integer controlOutsidersNum(BaseStatisticParams params);

    /**
     * 得到传入时间的检查方案
     * @param params
     * @return
     */
    List<Inspect> inspect(InspectStatisticParams params);

    List<String> inspectTop3(InspectStatisticParams params);

    Integer inspectResultNum(InspectStatisticParams params);

    Integer specialPlaceNum(UserPlaceRequest params);

    Integer specialUserNum(UserPlaceRequest params);

    List<EnterpriseTypeNumDto> cultureEnterpriseTypeNum();

    // 查询西博城的情况
    // 查询天府国际会议中心的情况


    Integer fourEnterpriseTypeNum();

    @Select(" SELECT DISTINCT year  FROM culture_enterprise WHERE del_flag = 0")
    List<Integer> cultureEnterprisegetYear();

    Double cultureEnterpriseByYear(Integer year,String season);

    @Select(" SELECT DISTINCT enterprise_type  FROM four_enterprise WHERE del_flag = 0  " +
            "ORDER BY FIELD(enterprise_type,'住宿业', '文体娱乐业', '互联网广告', '旅游服务','会展服务','文化艺术园区服务') ASC")
    List<String> fourEnterprisegetType();

    Double fourEnterpriseByMonth(String type,String season);

    @Select("SELECT COUNT(*) as number FROM place WHERE del_flag = 0 AND place_type='A级景区' AND shop_sign IS NOT NULL")
    String getAttractionsPlaceNum();

    String getAttractionsTouristNum(AttractionsRequest params);

    List<StatisticsAttractionsDto> StatisticsAttractions(AttractionsRequest params);

    @Select(" SELECT DISTINCT season  FROM culture_enterprise WHERE del_flag = 0\n" +
            "  ORDER BY FIELD(season,'3月', '6月', '9月', '12月') ASC")
    List<String> getSeason();


    List<ExhibitionDto> exhibition(ExhibitionRequest params);

    List<PlacePositionDto> inspectTrack();

    @Select(" SELECT DISTINCT season  FROM four_enterprise WHERE del_flag = 0\n" +
            "  ORDER BY FIELD(season,'3月', '6月', '9月', '12月') ASC")
    List<String> getFourSeason();

    List<ExhibitionDto> exhibitionLast();

    long RectificationNum(InspectStatisticParams params);

    List<InspectStatisticListDto> inspectList(Page page);

    List<SpecialPlaceAreaDto> getExhibitionPlaceList(String type);

    List<PlaceTypeCheckDto> placeTypeTodayCheck(String street);

    List<ImportantCompanyListDto> cultureImportantCompanyList(String choose);

    List<ImportantCompanyListDto> fourImportantCompanyList();


    // 查询西博城的情况
    // 查询天府国际会议中心的情况
    Map<String, Object> getExhibitionAndMeetingPlaceNum(Integer exhibitionStatisticYear);

    Map<String, Object> getPeripheryPlaceNum(Integer peripheryStatisticYear);

    Map<String, Object> inspectTrackAll();

    List<InspectTrackInfoDto> inspectTrackInfo();

    @Select("SELECT place_type.name FROM place_type where  place_type.p_id='0522fc0e64905dd79d80eafe9f343709'")
    List<String> getOrdinaryPlace();

    @Select("SELECT place_type.name FROM place_type where  place_type.p_id='179a5d7f28f51feb22b03f10b6db244f'")
    List<String> getSpecialPlace();
}
